#include "PzsPizzaStore.h"

using namespace FPHdPizzas;

PizzaStore::PizzaStore(std::shared_ptr<SimplePizzaFactory> simpleFactory)
{
    std::shared_ptr<SimplePizzaFactory> pFactory(new SimplePizzaFactory());
    m_pFacotry = std::move(pFactory);
}

std::shared_ptr<Pizza> PizzaStore::orderPizza(string type)
{
    std::shared_ptr<Pizza> pPizza(new Pizza());
    pPizza = m_pFacotry->createPizza(type);

    pPizza->prepare();
    pPizza->bake();
    pPizza->cut();
//    pPizza->box();

    return pPizza;
}
